package com.tedu.mall.controller;

import com.tedu.mall.mapper.CategoryMapper;
import com.tedu.mall.pojo.Category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class categoryController {
@Autowired
CategoryMapper categoryMapper;
@RequestMapping("/category/selectAll")
public List<Category> selectAll(){
    return categoryMapper.selectByExample(null);
}
}